/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main;

import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 *
 * @author xDrake
 */
public class Crypt {

    private static String salt = "nsdJb!2d_=$4d~n";

    public static String getSH1(String str) throws NoSuchAlgorithmException, UnsupportedEncodingException {
        MessageDigest cript = MessageDigest.getInstance("SHA-1");
        cript.reset();
        str += salt;
        cript.update(str.getBytes("utf8"));
        return new String(cript.digest());
    }
}
